package com.demo.concorll;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/person")
public class PersonYml {
//    @Value("${person.lastName}")
    String name;

    private static final Logger log = LoggerFactory.getLogger(PersonYml.class);

    @RequestMapping(value = "/getYMLvalues",method = RequestMethod.GET)
    public String getYMLvalues(@RequestParam(value = "person") String person) {
        log.info(name+">>>"+person);
        return "从YML文件获取值:" + name+"接收到的参数: "+person;
    }
}
